<template>
	<div>
		<el-form class="login-container">
			<h3 class="login-title">注册用户</h3>
			<el-form-item>
				<span>输入用户名:</span>
				<el-input type="text" v-model="user.username" placeholder="输入用户名"></el-input>
			</el-form-item>
			<el-form-item>
				<span>输入密码:</span><el-input type="password" v-model="user.password" placeholder="输入密码"></el-input>
			</el-form-item>
			<el-form-item>
				<el-button type="primary" style="width: 100%;" @click="insert()">注册</el-button>
			</el-form-item>
		</el-form>
	</div>
</template>

<script>
	export default{
		data(){
			return{
				user:{}
			}
		},
		methods:{
			insert(){
				axios.post("user/insert",this.user).then(resp=>{
				console.log(this.resp.data.data)
				})
			}
		}
	}
</script>

<style>
	.login-container{
		width: 350px;
		margin:100px auto 10px auto;
		border: 1px solid #eaeaea;
		padding:35px 35px 15px 35px;
		border-radius: 15px;
		box-shadow: 0 0 25px #cac6c6;
		
	}
	.login-title{
		text-align: center;
		color: #505458;
		margin: 0px auto 40px auto;
	}
	.login-remember{
		margin: 0px 0px 35px 0px;
	}
</style>
